import httpInstance from "@/utils/http"

// 加入购物车接口
export const inserCartAPI = ({skuId, count}) => {
    return httpInstance.post("/member/cart", {skuId, count})
}

// 获取购物车列表数据
export const getCartListAPI = () => {
    return httpInstance.get("/member/cart")
}

// 删除购物车商品
export const delCartAPI = (ids) => {
    return httpInstance({
        url: '/member/cart',
        method: 'DELETE',
        data: {
            ids
        }
    })
}

// 合并购物车数据
export const mergeCartAPI = (data) => {
    return httpInstance({
        url: '/member/cart/merge',
        method: 'POST',
        data
    })
}